package com.zjj.learn.designmodel.pattern.decorator;

/** 具体装饰角色：鸡蛋类
 * *** @author zjj_admin
 * *** 2022/4/11 21:47
 */
public class Egg extends Garnish {

    public Egg(FastFood fastFood) {
        super(fastFood,1,"鸡蛋");
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
